3.42 \(\int \cos ^4(c+d x) (a+i a \tan (c+d x))^3 \, dx\)

Optimal. Leaf size=27 \[ -\frac{i a^5}{2 d (a-i a \tan (c+d x))^2} \]

[Out]

((-I/2)*a^5)/(d*(a - I*a*Tan[c + d*x])^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0378988, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3487, 32} \[ -\frac{i a^5}{2 d (a-i a \tan (c+d x))^2} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4*(a + I*a*Tan[c + d*x])^3,x]

[Out]

((-I/2)*a^5)/(d*(a - I*a*Tan[c + d*x])^2)

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rubi steps

\begin{align*} \int \cos ^4(c+d x) (a+i a \tan (c+d x))^3 \, dx &=-\frac{\left (i a^5\right ) \operatorname{Subst}\left (\int \frac{1}{(a-x)^3} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac{i a^5}{2 d (a-i a \tan (c+d x))^2}\\ \end{align*}

Mathematica [A]  time = 0.251446, size = 50, normalized size = 1.85 \[ \frac{a^3 (3 \cos (c+d x)-i \sin (c+d x)) (\sin (3 (c+d x))-i \cos (3 (c+d x)))}{8 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4*(a + I*a*Tan[c + d*x])^3,x]

[Out]

(a^3*(3*Cos[c + d*x] - I*Sin[c + d*x])*((-I)*Cos[3*(c + d*x)] + Sin[3*(c + d*x)]))/(8*d)

________________________________________________________________________________________

Maple [B]  time = 0.06, size = 114, normalized size = 4.2 \begin{align*}{\frac{1}{d} \left ( -{\frac{i}{4}}{a}^{3} \left ( \sin \left ( dx+c \right ) \right ) ^{4}-3\,{a}^{3} \left ( -1/4\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}\sin \left ( dx+c \right ) +1/8\,\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) +1/8\,dx+c/8 \right ) -{\frac{3\,i}{4}}{a}^{3} \left ( \cos \left ( dx+c \right ) \right ) ^{4}+{a}^{3} \left ({\frac{\sin \left ( dx+c \right ) }{4} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\cos \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*(a+I*a*tan(d*x+c))^3,x)

[Out]

1/d*(-1/4*I*a^3*sin(d*x+c)^4-3*a^3*(-1/4*cos(d*x+c)^3*sin(d*x+c)+1/8*cos(d*x+c)*sin(d*x+c)+1/8*d*x+1/8*c)-3/4*
I*a^3*cos(d*x+c)^4+a^3*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c))

________________________________________________________________________________________

Maxima [B]  time = 1.70067, size = 77, normalized size = 2.85 \begin{align*} \frac{4 i \, a^{3} \tan \left (d x + c\right )^{2} + 8 \, a^{3} \tan \left (d x + c\right ) - 4 i \, a^{3}}{8 \,{\left (\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1\right )} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+I*a*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

1/8*(4*I*a^3*tan(d*x + c)^2 + 8*a^3*tan(d*x + c) - 4*I*a^3)/((tan(d*x + c)^4 + 2*tan(d*x + c)^2 + 1)*d)

________________________________________________________________________________________

Fricas [A]  time = 1.16282, size = 89, normalized size = 3.3 \begin{align*} \frac{-i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 2 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+I*a*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

1/8*(-I*a^3*e^(4*I*d*x + 4*I*c) - 2*I*a^3*e^(2*I*d*x + 2*I*c))/d

________________________________________________________________________________________

Sympy [A]  time = 0.481706, size = 82, normalized size = 3.04 \begin{align*} \begin{cases} \frac{- 4 i a^{3} d e^{4 i c} e^{4 i d x} - 8 i a^{3} d e^{2 i c} e^{2 i d x}}{32 d^{2}} & \text{for}\: 32 d^{2} \neq 0 \\x \left (\frac{a^{3} e^{4 i c}}{2} + \frac{a^{3} e^{2 i c}}{2}\right ) & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*(a+I*a*tan(d*x+c))**3,x)

[Out]

Piecewise(((-4*I*a**3*d*exp(4*I*c)*exp(4*I*d*x) - 8*I*a**3*d*exp(2*I*c)*exp(2*I*d*x))/(32*d**2), Ne(32*d**2, 0
)), (x*(a**3*exp(4*I*c)/2 + a**3*exp(2*I*c)/2), True))

________________________________________________________________________________________

Giac [B]  time = 1.29083, size = 182, normalized size = 6.74 \begin{align*} \frac{-8 i \, a^{3} e^{\left (12 i \, d x + 8 i \, c\right )} - 48 i \, a^{3} e^{\left (10 i \, d x + 6 i \, c\right )} - 112 i \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} - 128 i \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} - 16 i \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} - 72 i \, a^{3} e^{\left (4 i \, d x\right )}}{64 \,{\left (d e^{\left (8 i \, d x + 4 i \, c\right )} + 4 \, d e^{\left (6 i \, d x + 2 i \, c\right )} + 4 \, d e^{\left (2 i \, d x - 2 i \, c\right )} + 6 \, d e^{\left (4 i \, d x\right )} + d e^{\left (-4 i \, c\right )}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+I*a*tan(d*x+c))^3,x, algorithm="giac")

[Out]

1/64*(-8*I*a^3*e^(12*I*d*x + 8*I*c) - 48*I*a^3*e^(10*I*d*x + 6*I*c) - 112*I*a^3*e^(8*I*d*x + 4*I*c) - 128*I*a^
3*e^(6*I*d*x + 2*I*c) - 16*I*a^3*e^(2*I*d*x - 2*I*c) - 72*I*a^3*e^(4*I*d*x))/(d*e^(8*I*d*x + 4*I*c) + 4*d*e^(6
*I*d*x + 2*I*c) + 4*d*e^(2*I*d*x - 2*I*c) + 6*d*e^(4*I*d*x) + d*e^(-4*I*c))